İllere Göre Okullar
$q=mysqli_query($baglan,"Select * from kategori_okullar where subid = '0' order by id ");
$newrowcount = 1;
if ($r= mysqli_fetch_array($q)) {
do {
$r['adi_x'] = str_replace (" ","-",$r['adi']);
$r['adi_x'] = $r['adi_x']."-okulları";
echo "$r[adi] Okulları ";
$newrowcount++;
}
while ($r = mysqli_fetch_array($q));
}
?>
|
|
echo "Okullar - $ktop[adi] - $ktop[adi] $ara8"; ?>
echo "$ktop[adi]"; ?> -
$max=10;
if (!$page) $page=1;
$alt=($page - 1) * $max;
$q=mysqli_query($baglan,"Select * from okullar where konu like '%$ara%' and konu like '%$ara2%' order by tarih desc limit $alt,$max");
$sql2=mysqli_query($baglan,"Select * from okullar where konu like '%$ara%' and konu like '%$ara2%'");
$nr2=mysqli_num_rows($sql2);
if ($nr2 > 500) {
$nr2 = 500; }
$newrowcount = 1+$alt;
if ($r= mysqli_fetch_array($q)) {
do {$k = mysqli_fetch_array(mysqli_query($baglan,"Select * from kategori_okullar where id = '$r[category]'"));
if ($k['subid'] == 0) {
$k['subid'] = $k['id']; }
$ktop = mysqli_fetch_array(mysqli_query($baglan,"Select * from kategori_okullar where id = '$k[subid]'"));
$r['title'] = kysil($r['title']);
$r['title'] = substr($r['title'],0,50);
$r['title_x'] = str_replace (" ","-",$r['title']);
if ($ktop['adi']==$k['adi']) {
$k['adiz'] = "Merkez"; }
else {
$k['adiz'] = $k['adi']; }
echo "$newrowcount- $r[title] ( $ktop[adi] - $k[adiz] ) $r[adres]
";
$newrowcount++;
}
while ($r = mysqli_fetch_array($q));
}
?>
Sayfalar :
$ss=$nr2/$max;
$ss=ceil($ss);
for ($i=1;$i<=$ss;$i++) {
if ($i==14 or $i==27 or $i==40 or $i==53 ) echo " ";
if ($page == $i) echo "$i ";
else echo "[$i] ";
}
?>
|
|
|
|
|
$secenek=$dizin+$page*$ktop['id']+7125 ; ?>
$sql2=mysqli_query($baglan,"Select * from kategori_arabacc where adi like '%2010%' ");
$num_rows=mysqli_num_rows($sql2);
if ($dizin>$num_rows)
{
$sayi = ($dizin%$num_rows);
}
else
{
$sayi = ($num_rows%$dizin);
}
if ($num_rows-$sayi <= 1 )
{
$sayi = $num_rows-2;
}
if ($sayi <= 0 )
{
$sayi = 0;
}
$newrowcount = 1;
$q=mysqli_query($baglan,"Select * from kategori_arabacc where adi like '%2010%' order by adi limit $sayi,2");
if ($r= mysqli_fetch_array($q)) {
do { $k = mysqli_fetch_array(mysqli_query($baglan,"Select * from kategori_arabacc where id = '$r[subid]'"));
if ($newrowcount == 9999) {
$newrowcount = 0;
}
$r['adi'] = kysil($r['adi']);
$r['adi'] = substr($r['adi'],0,50);
$r['adi_x'] = str_replace (" ","-",$r['adi']);
echo "
";
$newrowcount++;
}
while ($r = mysqli_fetch_array($q));
}
?>
|